From: Keir Fraser Date: Thu, 20 Sep 2007 08:40:49 +0000 (+0100) Subject: [VTD] dynamically determines whether to link with libpci or not in QEMU. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14937^2~59^2~2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=563517920ce09cb84c92b2348ed8b54dd2bf8bb9;p=xen.git [VTD] dynamically determines whether to link with libpci or not in QEMU. This patch to ioemu/Makefile.target dynamically decides whether to link with libpci or not base on the existence of /usr/include/pci directory. If /usr/include/pci exists, PCI passthrough is enabled. Otherwise, it is disabled. Signed-off-by: Allen Kay --- diff --git a/tools/ioemu/Makefile.target b/tools/ioemu/Makefile.target index d0a8162507..5f1af2fabd 100644 --- a/tools/ioemu/Makefile.target +++ b/tools/ioemu/Makefile.target @@ -197,9 +197,6 @@ CPPFLAGS+=-D_GNU_SOURCE LIBS+=-lm LIBS+=-L../../libxc -lxenctrl -lxenguest LIBS+=-L../../xenstore -lxenstore -ifdef CONFIG_PASSTHROUGH -LIBS+=-lpci -endif ifndef CONFIG_USER_ONLY LIBS+=-lz endif @@ -351,6 +348,16 @@ ifdef CONFIG_WIN32 VL_OBJS+=tap-win32.o endif +ifeq (,$(wildcard /usr/include/pci)) +$(warning *** pciutils-devl package not found - missing /usr/include/pci) +$(warning *** PCI passthrough capability has been disabled) +else +LIBS+=-lpci +VL_OBJS+= pass-through.o +CFLAGS += -DCONFIG_PASSTHROUGH +$(info *** PCI passthrough capability has been enabled ***) +endif + SOUND_HW = sb16.o es1370.o AUDIODRV = audio.o noaudio.o wavaudio.o ifdef CONFIG_SDL @@ -403,9 +410,6 @@ VL_OBJS+= piix4acpi.o VL_OBJS+= xenstore.o VL_OBJS+= xen_platform.o VL_OBJS+= tpm_tis.o -ifdef CONFIG_PASSTHROUGH -VL_OBJS+= pass-through.o -endif CPPFLAGS += -DHAS_AUDIO endif ifeq ($(TARGET_BASE_ARCH), ppc)